import json

import pathway as pw


class PrintWriter(pw.io.python.ConnectorObserver):
    def on_change(self, key: pw.Pointer, row: dict, time: int, is_addition: bool):
        print(row)
        # pass
        # for i in row['sections']:
        #     pass
            # print(type(i))
        # print(row)
        # print(json.dumps(row))
        # pass

    def on_end(self):
        print("End of stream.")
